<template>
  <div>
    <el-form ref="form" :model="form" :rules="rules" label-width="80px">
                      <el-form-item label="审核信息" prop="aInfo">
                        <el-input v-model="form.aInfo" placeholder="请输入审核信息" />
                      </el-form-item>
                      <el-form-item label="企业基地信息、产品、案例id" prop="aPId">
                        <el-input v-model="form.aPId" placeholder="请输入企业基地信息、产品、案例id" />
                      </el-form-item>
                      <el-form-item label="企业基地信息、产品、案例表名" prop="pName">
                        <el-input v-model="form.pName" placeholder="请输入企业基地信息、产品、案例表名" />
                      </el-form-item>
                      <el-form-item label="删除标志" prop="delFlag">
                        <el-input v-model="form.delFlag" placeholder="请输入删除标志" />
                      </el-form-item>
                      <el-form-item label="备注" prop="remark">
                        <el-input v-model="form.remark" placeholder="请输入备注" />
                      </el-form-item>
    </el-form>
    <div slot="footer" class="dialog-footer">
      <el-button type="primary" @click="submitForm">确 定</el-button>
      <el-button @click="cancel">取 消</el-button>
    </div>
  </div>
</template>

<script>
import AddMixin from "@/minixs/add"
import request from "@/utils/request";
export default {
  name: "add",
  mixins:[AddMixin],
  data() {
    return {
      // 表单数据
      form: {
                      id: null,
                      aInfo: null,
                      aPId: null,
                      pName: null,
                      delFlag: null,
                      createBy: null,
                      updateBy: null,
                      createTime: null,
                      updateTime: null,
                      remark: null
      },
      // 表单校验
      rules: {
                      aInfo: [
                  { required: true, message: "审核信息不能为空", trigger: "blur" }
                ],
                      aPId: [
                  { required: true, message: "企业基地信息、产品、案例id不能为空", trigger: "blur" }
                ],
                      pName: [
                  { required: true, message: "企业基地信息、产品、案例表名不能为空", trigger: "blur" }
                ],
      }
    }
  },
  methods: {
    // 保存数据
    save(){
      request({
        url: '/info/auditing',
        method: 'post',
        data: this.form
      }).then(response => {
        this.$modal.msgSuccess("新增成功");
        this.$emit("reload")
        this.cancel();
      });
    },
  }
};
</script>
